﻿using System;
using System.Linq.Expressions;

using PM.Entity;
using PM.Model.ReturnModel;
using PM.IRepository;
using PM.Repository;
using PM.Helper;
namespace PM.Bussiness
{
    public class UserBLL : BaseBLL<sys_user>
    {
        private IUser DAL = new UserDAL();

        public override void SetCurrentRepository()
        {
            CurrentRepository = DAL;//CurrentRepository属性在BaseBLL中定义
        }
        public sys_user Login(string username, string psd)
        {
            Expression<Func<sys_user, bool>> where = (p => (p.UserID == username) && p.Password == psd);
            return CurrentRepository.GetByWhere(where);
        }
    }
}
